<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\GameOrder
 *
 * @property int $id 自增ID
 * @property int $user_id 用户ID
 * @property int $game_id 游戏ID
 * @property int $type 类型（1-节点 2-节点包）
 * @property string $location 我的节点位置
 * @property int $parent_id 上级用户ID
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property-read \App\Models\User $user
 * @method static \Illuminate\Database\Eloquent\Builder|GameOrder newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|GameOrder newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|GameOrder query()
 * @method static \Illuminate\Database\Eloquent\Builder|GameOrder whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|GameOrder whereGameId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|GameOrder whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|GameOrder whereLocation($value)
 * @method static \Illuminate\Database\Eloquent\Builder|GameOrder whereParentId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|GameOrder whereType($value)
 * @method static \Illuminate\Database\Eloquent\Builder|GameOrder whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|GameOrder whereUserId($value)
 * @mixin \Eloquent
 */
class GameOrder extends Model
{
    protected $table = 'game_orders';

    public function user()
    {
        return $this->belongsTo(User::class);
    }
}
